window.vm = new Vue({
    el: '#app',
    data: {

        //表单数据
        oneAll: [],
        oneAll1: [],
        userPro: [],
        userPro1: [],
        userPro2: [],
        userPro3: [],
        userPro4: [],
        allCount: 3,
        approve: '',


        respa1: [],
        activeName: 'first',
        accepted: null,
        user_ticket: '',
        token: '',
        score: '',
        user: '',

    },
    methods: {
        toOneProcess:function (value){
            sessionStorage.setItem("processNo",JSON.stringify(value.processNo));
            //获取审批信息
            axios.get(
                "/getApprove1",{
                    params: {
                        processNo: value.processNo
                    }
                }
            ).then(function (res) {
                vm.approve = res.data
                if(vm.approve.status===2){
                    top.location.href = "processUpdate.html"
                } else{
                    top.location.href = "oneProcess.html"
                }
            }).catch(e => {
                ajaxError(vm, e);
            });


        },

        linkQuestion:function (){
            top.location.href = "create.html";
        },

        linkHelp:function (){
            top.location.href = "create.html";
        },
        handleClick(tab, event) {
            // console.log(tab, event);
        },
        handleClick1() {
            top.location.href = "create.html";
        },

        toIndex(){
            top.location.href="index.html"

        },

    },
    created: function () {

        axios.get(
            "/userProAll",
        ).then(function (res) {
            vm.oneAll=res.data
        }).catch(e => {
            ajaxError(vm, e);
        });

        axios.get(
            "/getProApp",
        ).then(function (res) {
            vm.oneAll1=res.data
        }).catch(e => {
            ajaxError(vm, e);
        });

        axios.get(
            "/userPro",
        ).then(function (res) {
            vm.userPro=res.data
        }).catch(e => {
            ajaxError(vm, e);
        });


        axios.get(
            "/userPro1",
        ).then(function (res) {
            vm.userPro1=res.data
        }).catch(e => {
            ajaxError(vm, e);
        });


        axios.get(
            "/userPro2",
        ).then(function (res) {
            vm.userPro2=res.data
        }).catch(e => {
            ajaxError(vm, e);
        });


        axios.get(
            "/userPro3",
        ).then(function (res) {
            vm.userPro3=res.data
        }).catch(e => {
            ajaxError(vm, e);
        });


        axios.get(
            "/userPro4",
        ).then(function (res) {
            vm.userPro4=res.data
        }).catch(e => {
            ajaxError(vm, e);
        });



    },
});